We have moved our forum to GitHub Discussions. For questions about Phalcon v3/v4/v5 you can visit here and for Phalcon v6 here.

when use $response->setStatusCode is too slow

i use phalcon make restfull app.

but test use send http statuscode use \Phalcon\Http\Response();

then app too slow on apache ab.

is bug ?



1.5k

but is use php natvie header send http code is ok

Im using nginx + php5-fpm and there is no diffrence.

edited Dec '15

What guys are you pointing out here? That setting HTTP status response code with native Phalcon method via shared service Response is noticably slower than using RAW PHP? If you want to rely on PHP's internal functions, instead of header(), set it with:

http_response_code(500);